<template>
  <div>
    测试页面！
    <p>
      <button @click="addNum">加</button> {{ count }} <button @click="substractNum">减</button>
    </p>
  </div>
</template>

<script>
export default {
  data () {
    return {}
  },
  created () {},
  computed: {
    count () {
      return this.$store.state.count
    }
  },
  methods: {
    addNum () {
      this.$store.state.count++
    },
    substractNum () {
      this.$store.state.count--
    }
  }
}
</script>

<style>

</style>
